/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ants;

import java.util.Random;

/**
 *
 * @author uhgy3k
 */
public class Hormiga {
    public int tipo;
    public int id;
    public Hormiga(int i, int t) {
        tipo = t;
        id = i;
    }
    
    public int getMovimiento(Perspective p) {
        Random ran = new Random();
        int x;
        do {
            x = ran.nextInt(9);
        }while(p.tiles[(int)(x/3)][x%3].type == Constantes.obstaculo);
        return x;
    }
    
}